﻿using MugenInjection.Delegates;
using MugenInjection.Interface;
using MugenInjection.Syntax.Constant;
using MugenInjection.Syntax.Method;
using MugenInjection.Syntax.Type;

namespace MugenInjection.Syntax
{
    /// <summary>
    /// Specific fluent syntax for create binding.
    /// </summary>
    public interface ICommonBindingSyntax : IBindingBuilder
    {
        /// <summary>
        /// Indicates that the service should be bound to the specified types.
        /// </summary>
        /// <param name="typeTo">The specified <see cref="System.Type"/>.</param>
        /// <returns></returns>
        ITypeCallbackConstructorObjectPriorityScopeUseWhenWithSyntax To(System.Type typeTo);

        /// <summary>
        /// Indicates that the service should be bound to the specified custom binding.
        /// </summary>
        /// <param name="customBinding">The specified <see cref="IBinding"/>.</param>
        /// <returns>The fluent syntax.</returns>
        IMethodCallbackObjectPriorityScopeUseWhenWithSyntax ToCustomBinding(IBinding customBinding);
    }

    /// <summary>
    /// Specific fluent syntax for create binding.
    /// </summary>
    public interface IBindingSyntax : ICommonBindingSyntax
    {
        /// <summary>
        /// Indicates that the service should be self-bound.
        /// </summary>
        /// <returns>The fluent syntax.</returns>
        ITypeCallbackConstructorObjectPriorityScopeUseWhenWithSyntax ToSelf();

        /// <summary>
        /// Indicates that the service should be bound to the specified method.
        /// </summary>
        /// <param name="methodBindingDelegate">The specified <see cref="MethodBindingDelegate"/>.</param>
        /// <returns>The fluent syntax.</returns>
        IMethodCallbackObjectPriorityScopeUseWhenWithSyntax ToMethod(MethodBindingDelegate methodBindingDelegate);

        /// <summary>
        /// Indicates that the service should be bound to the specified constant value.
        /// </summary>
        /// <param name="constValue">The specified constant value.</param>
        /// <returns>The fluent syntax.</returns>
        IConstantObjectPriorityWhenSyntax ToConstant(object constValue);
    }
}